/*
 * @Author: lixiaowei
 * @Date: 2021-04-10 18:36:52
 * @LastEditors: lixiaowei
 * @LastEditTime: 2021-04-10 18:43:12
 * @Description: file content
 * @FilePath: /heima-bli/STL/迭代器.cpp
 */

#include <iostream>
#include <list>

using namespace std;

int main()
{
  list<int> v;
  v.push_back(1);
  v.push_back(2);
  v.push_back(3);
  v.push_back(4);

  cout << *v.begin() << endl;
  cout << *v.end() << endl;

  list<int>::iterator it;
  for (it = v.begin(); it != v.end(); it++)
  {
    cout << *it << endl;
  }

  return 0;
}